package com.aaa.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
 * @author 荆豪峰
 * @version 1.0
 */
@Controller
public class LoginController {
    @RequestMapping("login")
    public String login(){
        System.out.println("执行登录的方法");
        return "redirect:main.html";
    }
//    @Secured("ROLE_abc")

    @RequestMapping("main")
    public String toMain(){
        return "main";
    }

    @RequestMapping("toError")
    public String toError(){
        return "redirect:error.html";
    }

    @RequestMapping("fail")
    public String fail(){
        return "redirect:403.html";
    }

    @RequestMapping("demo")
    @ResponseBody
    public String demo(){
        return "demo";
    }
}
